package o;

import android.content.Context;
import android.view.View;
import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.appgallery.foundation.store.bean.user.GetPersonalInfoResBean;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.usercenter.award.protocol.AwardProtocol;
import com.huawei.appmarket.service.usercenter.award.protocol.AwardProtocol.Request;
import o.der.f;

public class ekx extends ekw {
    protected ekx(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        super.ˏ(view);
        this.ˎ.setText(f.ꞌॱ);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        boolean z = true;
        super.ˏ(cardBean);
        if (UserSession.getInstance().isLoginSuccessful()) {
            GetPersonalInfoResBean ˊ = ekg.ॱ().ˊ();
            if (ˊ == null || ˊ.ˋ() != 1) {
                z = false;
            }
            ˏ(z);
            return;
        }
        ˏ(false);
        ekr.ॱ(ekp.ˊ, ekr.ˎ);
    }

    public void onClick(View view) {
        ˏ(false);
        if (UserSession.getInstance().isLoginSuccessful()) {
            GetPersonalInfoResBean ˊ = ekg.ॱ().ˊ();
            if (ˊ != null) {
                ˊ.ˊ(0);
            }
            ekr.ॱ(ekp.ˊ, ekr.ˎ);
        }
        ˊ();
        ˋ();
    }

    public void ˊ() {
        cjo awardProtocol = new AwardProtocol();
        Request request = new Request();
        request.ˏ("2");
        awardProtocol.ˏ(request);
        cjk.ˎ().ˋ(this.ˊ, new cjm("myaward_activity", awardProtocol));
    }
}
